<!-- File: /app/views/posts/add.ctp -->

<h1>Add Post</h1>
<div id="mydiv"></div>
<?php if (isset($test)) echo $test; ?>
<?php
//echo $ajax->form('add', 'post', array('update' => 'mydiv'));
echo $ajax->form(
	'add', 'post',
array('update' => 'mydiv',
	 'url' => array('controller' => 'posts', 'action' => 'ajax_add')
, 'complete' => 'alert(request.responseText)'));
echo $form->input('title');
echo $form->input('body', array('rows' => '3'));
echo $form->end('Save Post');
?>
